﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Idlesoft.ShellAnywhereLanguage
{
	public interface IRegistry<TItem>
		where TItem : class, IParam
	{
		void Register<TResult>(params TResult[] items) 
			where TResult : class, TItem;

		void Unregister<TResult>(params TResult[] items) 
			where TResult : class, TItem;

		ILexeme<TItem> Find(string pattern);

		ILexeme<TResult> Find<TResult>(string pattern)
			where TResult : class, TItem;

		ILexeme<TItem> Find<TConstraint>(TConstraint constraint, string pattern)
			where TConstraint : class, TItem;

		ILexeme<TResult> Find<TResult, TConstraint>(TConstraint constraint, string pattern)
			where TResult : class, TItem
			where TConstraint : class, TItem;

	}
}
